1. Field of Invention
This invention relates to retrieving and rendering data in relational databases, specifically to how to visualize the data relationship.
2. Background of the Invention
Most software applications are implemented in object-oriented languages, and process data in relational databases. Usually the data from one object is saved to one database table. Objects are related. Users routinely need to retrieve the data in an object and several of its related objects when developing object-oriented applications. To retrieve these data, several SQL queries have to be executed against different database tables. It is tedious and time consuming to write, maintain and execute these queries manually.
Several existing products have features to help users to retrieve and rendering related data. The “Toad” product from Quest Software (www.guest.com) has a tool called master-detail browser. It has five grids arranged vertically. Each grid has a list box above it to allow users to pick a table. Users can pick a table for the top grid to display all the table records data in that grid. Then, users can highlight a record in the first grid, and pick a related table from the list box above the second grid to display only the related table records in the second grid. Similarly, users can highlight a record in second grid, and pick a table for the third grid, and keep going.
The major disadvantage of this method is that users are not able to see a whole picture of these relationships. Assuming a purchase order table has related data in line item table, shipping information table, and tax information table, the tool does not allow users to see these relationships at the same time. Users have to pick one of the related tables in a list box, see its data, pick another one, see its data, and so on.
The second disadvantage is that the first grid displays all data in the selected table, which could be hundreds and thousands of records for a normal table. It is time consuming to load and render these data. Users normally want to see only a few of these table records.
The “DbSpider” product from “Diligent it Solutions Ag” (www.diligent-it.com) allows users to execute one SQL query, and display the query result and related data in one tree layout. Each tree node represents a table record, with the table record data displayed vertically as column name and column value pairs. A button is. displayed if a column holds a key value referring to another table. Users can click the button to open another tree node containing a related table record.
The major disadvantage of this method is that it layouts the table data and data relationship together. Usually a table has many columns, and one table could relate to several tables, and each of these tables could relate to other tables. This will make the graph very large, and hard for users to navigate.
Another disadvantage is that to display related table records, users have to look for the buttons in the vertical column name and column value layout. Usually users are more concerned about the relationship rather than about how the data are related. It is a level of detail that should be abstract from the users. Also, if a table have many columns, searching for these buttons is inconvenient.